package com.cftime.sign.dao.impl;

import java.sql.SQLException;
import java.util.HashMap;
import java.util.Map;

import com.cftime.sign.dao.CfUserDao;
import com.cftime.sign.model.CfUserinfo;
import com.cftime.sign.service.CfUserService;

public class CfUserDaoImpl implements CfUserDao {

	private CfUserService cfUserService = new CfUserService();
	
	@Override
	public CfUserinfo loginUser(String username, String password) {
		Map<String, String> param = new HashMap<String, String>();
		param.put("cfPassEmail", username);
		param.put("cfPassWord", password);
		try {
			return cfUserService.getUserByParam("CfUserinfo.loginUserinfo", param);
		} catch (SQLException e) {
			e.printStackTrace();
		}
		return null;
	}

}
